import './App.css';

function App() {
  const baseUrl = window.location.origin;
  const clientId = import.meta.env.VITE_GITEE_CLIENT_ID;
  const authUrl = `https://gitee.com/oauth/authorize?client_id=${clientId}&redirect_uri=${baseUrl}/gitee/callback?scope=user_info,projects&response_type=code`;
  return (
    <div className="App">
      <div className="flex justify-center items-center">
        <a
          href={authUrl}
          target="_self"
          className="block mt-4 py-2 px-4 text-white bg-cyan-500 rounded-md border border-cyan-500"
        >
          Gitee App Authrization
        </a>
      </div>
    </div>
  );
}

export default App;
